package com.tech.zhidengxian;


import com.google.gson.annotations.SerializedName;

import org.json.JSONObject;

import java.util.Objects;

/***
 * 多轮对话
 * {
 *     "err_code": "200",
 *     "err_msg": "请求成功",
 *     "trace_id": "f4947f66b0d73bda",
 *     "data": {
 *         "skill": "nlp_qa",
 *         "text": "仪表盘上的指示灯亮了",
 *         "scene": "what_is_it",
 *         "action": "",
 *         "answer": "",
 *         "data": {
 *             "nlp_qa": {
 *                 "form": {
 *                     "id": 33,
 *                     "uuid": "751c05db33b5452efabec0a05cd7807e",
 *                     "times": 2,
 *                     "text": "仪表盘上的灯亮了<div><br></div>",
 *                     "slot": [
 *                         {
 *                             "id": 71,
 *                             "name": "位置",
 *                             "sign": "location",
 *                             "entity_lib_id": 78,
 *                             "form_id": 33,
 *                             "app_id": "",
 *                             "is_must": 1,
 *                             "clarify_text": "请问是在什么位置呢",
 *                             "clarify_times": 2,
 *                             "order_num": 0
 *                         },
 *                         {
 *                             "id": 72,
 *                             "name": "颜色",
 *                             "sign": "color",
 *                             "entity_lib_id": 79,
 *                             "form_id": 33,
 *                             "app_id": "",
 *                             "is_must": 1,
 *                             "clarify_text": "请问是什么颜色的呢",
 *                             "clarify_times": 2,
 *                             "order_num": 1
 *                         },
 *                         {
 *                             "id": 73,
 *                             "name": "指示灯",
 *                             "sign": "Indicator_light",
 *                             "entity_lib_id": 87,
 *                             "form_id": 33,
 *                             "app_id": "",
 *                             "is_must": 1,
 *                             "clarify_text": "请问是哪个指示灯呢",
 *                             "clarify_times": 2,
 *                             "order_num": 2
 *                         }
 *                     ],
 *                     "clarify": {
 *                         "slot": 0,
 *                         "times": 2
 *                     },
 *                     "complete": false,
 *                     "answer": "请问是在什么位置呢"
 *                 }
 *             }
 *         }
 *     }
 * }
 */
public class AsrMultiRoundBean<T> {
    @SerializedName("skill")
    private  String  skill;
    @SerializedName("text")
    private  String  text;
    @SerializedName("scene")
    private  String scene;
    @SerializedName("action")
    private  String action;
    @SerializedName("answer")
    private  String answer;
    @SerializedName("data")
    private  AsrNlpQaBean<T>  data;

    public static class AsrNlpQaBean<T>{
        @SerializedName("nlp_qa")
        private  T  nlp_qa;

        public T getNlp_qa() {
            return nlp_qa;
        }

        public void setNlp_qa(T nlp_qa) {
            this.nlp_qa = nlp_qa;
        }


        @Override
        public String toString() {
            return "AsrNlpQaBean{" +
                    "nlp_qa=" + nlp_qa +
                    '}';
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            AsrNlpQaBean<?> that = (AsrNlpQaBean<?>) o;
            return Objects.equals(nlp_qa, that.nlp_qa);
        }

        @Override
        public int hashCode() {
            return Objects.hash(nlp_qa);
        }
    }




    public String getSkill() {
        return skill;
    }

    public void setSkill(String skill) {
        this.skill = skill;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getScene() {
        return scene;
    }

    public void setScene(String scene) {
        this.scene = scene;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public AsrNlpQaBean<T> getData() {
        return data;
    }

    public void setData(AsrNlpQaBean<T> data) {
        this.data = data;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AsrMultiRoundBean<?> that = (AsrMultiRoundBean<?>) o;
        return Objects.equals(skill, that.skill) && Objects.equals(text, that.text) && Objects.equals(scene, that.scene) && Objects.equals(action, that.action) && Objects.equals(answer, that.answer) && Objects.equals(data, that.data);
    }

    @Override
    public String toString() {
        return "AsrMultiRoundBean{" +
                "skill='" + skill + '\'' +
                ", text='" + text + '\'' +
                ", scene='" + scene + '\'' +
                ", action='" + action + '\'' +
                ", answer='" + answer + '\'' +
                ", data=" + data +
                '}';
    }

    @Override
    public int hashCode() {
        return Objects.hash(skill, text, scene, action, answer, data);
    }
}
